package com.blue.crawler.util;

/**
 * HTTP服务异常
 * 
 * @author zhengj
 * @since 1.0 2016年11月13日
 */
public class HttpException extends RuntimeException
{
	private static final long serialVersionUID = 1L;
	
	private int code;
	private String message;

	public HttpException(int code, String message)
	{
		super(message);
		this.code = code;
		this.message = message;
	}

	public int getCode()
	{
		return code;
	}

	public String getMessage()
	{
		return message;
	}

	@Override
	public String toString()
	{
		return String.format("[%d]%s", code, message);
	}
	
}
